package com.hu.chat.model;

import lombok.Getter;

@Getter
public enum RCodeEnum {

    OK(200, "成功"),
    FAIL(201, "失败"),
    SERVICE_ERROR(2012, "服务异常"),
    DATA_ERROR(204, "数据异常"),
    ILLEGAL_REQUEST(205, "非法请求"),
    REPEAT_SUBMIT(206, "重复提交"),
    ARGUMENT_VALID_ERROR(210, "参数校验异常"),
    SQL_ERROR(211, "sql异常"),

    LOGIN_AUTH(208, "未登陆"),
    PERMISSION(209, "没有权限"),
    ACCOUNT_ERROR(214, "账号不正确"),
    PASSWORD_ERROR(215, "密码不正确"),
    LOGIN_MOBLE_ERROR(216, "账号不正确"),
    ACCOUNT_STOP(217, "账号已停用"),
    NODE_ERROR(218, "该节点下有子节点，不可以删除");

    // SUCCESS(200, "操作成功"),
    // PARAM_ERROR(400, "参数错误"),
    // TOKEN_NULL(401, "请先登录！"),
    // TOKEN_INVALID(403, "token已失效，请重新登录！"),
    // REQUEST_NOT_FOUND(404, "请求地址不存在！"),
    // METHOD_NOT_ALLOWED(405, "请求类型错误GET/POST"),
    // REQUEST_NO_RIGHT(407, "该功能未向您开放"),
    // FAIL(499, "操作失败"),
    // EXCEPTION(500, "系统错误，请联系管理员");

    private final Integer code;

    private final String message;

    RCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
